package org.docmanagement.services;

import java.util.List;

import org.docmanagement.commons.service.GenericService;
import org.docmanagement.data.Element;

/**
 * Created on 27 oct. 2004
 * @author eveno
 */
public interface ElementService extends GenericService<Element>
{
    /**
     * Looks up file elements by main category id.
     * @return
     * @throws ElementException
     */
    public List<? extends Element> findByMainCategoryId(Integer id) throws ElementException;
    /**
     * Looks up elements by category id.
	 * @param id the ID for the element
	 * @return Element
	 */
    public List<? extends Element> findByCategoryId(Integer id) throws ElementException;
    /**
     * Looks up a element by ID.
	 * @param id the ID for the element
	 * @return Element
	 */
    public List<? extends Element> findWithNoCategory() throws ElementException;
    /**
     * Looks up a element by ID.
	 * @param id the ID for the element
	 * @return List
	 */
    public List<? extends Element> findByKeywordId(Integer id) throws ElementException;
    /**
     * Looks up a element by ID.
	 * @param id the ID for the element
	 * @return List
	 */
    public List<? extends Element> findByKeywordIds(Integer[] id) throws ElementException;
    /**
     * Looks up a element by ID.
	 * @param id the ID for the element
	 * @return List
	 */
    public List<? extends Element> findByTitle(String titlePattern) throws ElementException;
    /**
     * Looks up a element by ID.
	 * @param id the ID for the element
	 * @return List
	 */
    public List<? extends Element> findByTitle(String titlePattern, char type) throws ElementException;
    /**
     * Looks up a element by content (url or link).
	 * @param id the ID for the element
	 * @return List
	 */
    public List<? extends Element> findByContent(String contentPattern) throws ElementException;
    /**
     * Looks up a element by Description.
	 * @param id the ID for the element
	 * @return List
	 */
    public List<? extends Element> findByDescription(String contentPattern) throws ElementException;
}
